/*
 * Copyright 2011 Alex Paréj.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.mkdir.web.controller;

import java.io.Serializable;
import java.util.List;
import javax.faces.bean.ViewScoped;
import javax.inject.Inject;
import javax.inject.Named;
import org.mkdir.ejb.FelhasznaloService;
import org.mkdir.model.Felhasznalo;

/**
 *
 * @author Alex Paréj
 */
@Named
@ViewScoped
public class FelhasznalokController implements Serializable {

    @Inject
    private FelhasznaloService felhasznaloService;
    private List<Felhasznalo> felhasznalok;
    private List<Felhasznalo> filteredFelhasznalok;
    private String valasztottEmail;

    public List<Felhasznalo> getFelhasznalok() {
        if (felhasznalok == null) {
            felhasznalok = felhasznaloService.getOsszesFelhasznalo();
        }
        return felhasznalok;
    }

    public String getValasztottEmail() {
        return valasztottEmail;
    }

    public void setValasztottEmail(String valasztottEmail) {
        this.valasztottEmail = valasztottEmail;
    }

    public List<Felhasznalo> getFilteredFelhasznalok() {
        return filteredFelhasznalok;
    }

    public void setFilteredFelhasznalok(List<Felhasznalo> filteredFelhasznalok) {
        this.filteredFelhasznalok = filteredFelhasznalok;
    }
}
